package com.github.framework.webmvc.servlet;

import java.lang.reflect.Method;
import java.util.regex.Pattern;

/**
 * @program: springv2
 * @description: url和method的映射关系
 * @author: Pop
 * @create: 2021-06-21 22:47
 **/
public class HandlerMapping {

    private Pattern url; //对应的url
    private Method method; // 对应的method
    private Object controller; // 对应的实例

    public HandlerMapping(Pattern url, Method method, Object controller) {
        this.url = url;
        this.method = method;
        this.controller = controller;
    }

    public Pattern getUrl() {
        return url;
    }

    public void setUrl(Pattern url) {
        this.url = url;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Object getController() {
        return controller;
    }

    public void setController(Object controller) {
        this.controller = controller;
    }
}
